<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<title>Examples</title>
	<meta name="description" content="">
	<meta name="keywords" content="">
	<link href="" rel="stylesheet">
	<link rel="stylesheet" href="../style.css">
	<script src="../vue.js"></script>
</head>
<body>
    <!--父组件模板-->
	<div id="parent-template">
		<child>
			<!--此处是待分发的内容-->
			<p slot="one">one</p>
			<p slot="two">two</p>
			<p>default</p>
		</child>
	</div>

	<script>
		Vue.component("child", {
			template: '<div>'+
				'<h1>内容被分发且重新组合</h1>'+
				'<slot>默认分发处</slot>'+
				'<slot name="two"></slot>'+
				'<slot name="one"></slot>'+
			'</div>'
		});

		new Vue({
			el: "#parent-template"
		})
	</script>
</body>
</html>